cmake_minimum_required(VERSION 3.5)

project(SimplePendulum LANGUAGES CXX)

set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

# LibTorch
find_package(Torch REQUIRED PATHS "/opt/libtorch")

# Code
include_directories( . )
set(SRCS
    nets.cpp
)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TORCH_CXX_FLAGS}" )
add_executable(${PROJECT_NAME} main.cpp ${SRCS})
target_link_libraries(${PROJECT_NAME} ${TORCH_LIBRARIES} )
